package com.daodai.hjcjhsystemtd.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.daodai.hjcjhsystemtd.model.pojos.DeviceControlTdengineEntity;
import com.daodai.hjcjhsystemtd.model.pojos.TdengineEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@DS("tdengine")
public interface TdengineMapper {

    @Select("SHOW TABLES")
    List<String> getAllTables();

    @Insert("insert into t values (#{time},#{value})")
    void insertTest(@Param("time") long time, @Param("value") int value);



   void insertBatch(@Param("tdengineEntityList") List<TdengineEntity> tdengineEntityList);

   void writeCobtrolNodeToTdengine(@Param("deviceControlTdengineEntityList") List<DeviceControlTdengineEntity> deviceControlTdengineEntityList);
}
